﻿using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace WpfApp5
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void Slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
        {
            RotateControl.Angle = (double)e.NewValue;
        }

        private void ModelUIElement3D_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            ModelUIElement3D modelUIElement3D = (ModelUIElement3D)sender;
            GeometryModel3D geometry3D = (GeometryModel3D)modelUIElement3D.Model;
            (geometry3D.BackMaterial as DiffuseMaterial).Brush = Brushes.AliceBlue;
        }
    }
}